package DesignPattern.Proxy.CGLIB;

/**
 * @Author: Jun
 * @Date: 2018/9/28 11:16
 */
public class ReflectServiceImpl {
    public void sayHello(String name){
        System.out.println("Hello"+name);
    }
    public ReflectServiceImpl getInstance(){
        ReflectServiceImpl objcet=null;
        try{
            objcet= (ReflectServiceImpl) Class.forName("DesignPattern.Proxy.CGLIB.ReflectServiceImpl").newInstance();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        return objcet;
    }
}
